﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;

namespace Search
{
    
    /// <summary>
    /// A container for full-text search result
    /// </summary>
    /// 
    public class FullTextResult
    {
        /// <summary>
        /// Link of the page that contains the keywords
        /// </summary>
        public Uri Link { get; private set; }
        /// <summary>
        /// The page title found
        /// </summary>
        public string PageTitle { get; private set; }
        /// <summary>
        /// A short fragment of the page
        /// </summary>
        public string Snippet { get; private set; }

        /// <summary>
        /// Simple constructor
        /// </summary>
        /// <param name="link">The link</param>
        /// <param name="pageTitle">The page title</param>
        /// <param name="snippet">The snippet</param>
        public FullTextResult(Uri link, string pageTitle, string snippet)
        {
            Link = link;
            PageTitle = pageTitle;
            Snippet = snippet;
        }
    }     
    
    /// <summary>
    /// Enumeration of the possible categories (provisional)
    /// </summary>
    public enum Category
    { 
        Trip,
        User,
        Other
    }
            
    /// <summary>
    /// Container for full-text search result organized by User, Trip or others page
    /// </summary>
    public class FullTextCategorizedResult : FullTextResult
    {

        /// <summary>
        /// The category of the result
        /// </summary>
        public Category CategoryName { get; private set; }


        public FullTextCategorizedResult(Uri link, string pageTitle, string snippet,Category categoryName): base(link,pageTitle,snippet)
        {
            
            CategoryName = categoryName;
        }

    }
}
